//
//  model.swift
//  Swift-demo
//
//  Created by zcp on 2021/9/30.
//

import Foundation
import HandyJSON

struct ReturnData<T: HandyJSON>: HandyJSON {
    var message: String?
    var returnData: T?
    var stateCode: Int = 0
    
    
}

struct ResponseData<T: HandyJSON>: HandyJSON {
    var code: Int = 0
    var data: ReturnData<T>?
}


struct TextItems: HandyJSON {

}

struct FloatItems: HandyJSON {
   var localInfoButton: Bool = false

}

struct Ext: HandyJSON {
   var key: String?
   var val: Int = 0

}

struct GalleryItems: HandyJSON {
   var content: String?
   var id: Int = 0
   var ext: [Ext]?
   var title: String?
   var topCover: String?
   var linkType: Int = 0
   var cover: String?

}

struct ItemModel: HandyJSON {
   var comicId: Int = 0
   var title: String?
   var cover: String?
   var subTitle: String?

   var linkType: Int = 0
   var id: Int = 0
   var content: String?
   var ext: [Ext]?

   var commentId: Int = 0
   var threadId: String?
   var objectType: String?
   var comment: String?
   var comicName: String?

}

struct ModuleInfo: HandyJSON {
   var argName: String?
   var argValue: Int = 0
   var title: String?
   var icon: String?
   var bgCover: String?

}

struct Modules: HandyJSON {
    var moduleInfo: ModuleInfo?
//    var items: AnyObject?
    var items: [[ItemModel]]?
    var moduleType: Int = 0
    var uiType: Int = 0
}

// 发现首页
struct HomeDatasModel: HandyJSON {
    var textItems: [TextItems]?
    var curTime: Int = 0
    var editTime: String?
    var floatItems: FloatItems?
    var galleryItems: [GalleryItems]?
    var defaultSearch: String?
    var modules: [Modules]?

}
